<!DOCTYPE html>
<html>
<head>

    <%  let titleName ;
        if(pastArr.length != 0 || nowArr.length != 0) {
            if (pastArr[0]) {
                if( pastArr[0].bookcase){
                    titleName = pastArr[0].bookcase.name
                }
            } else if (nowArr[0]) {
                if(nowArr[0].bookcase){
                    titleName = nowArr[0].bookcase.name
                }
            }
        }
    %>
    <title><%=titleName%></title>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">

    <% include ../../common/public.ejs %>

    <link rel="stylesheet" href="//cdn.bootcss.com/weui/1.1.1/style/weui.min.css">
    <link rel="stylesheet" href="//cdn.bootcss.com/jquery-weui/1.0.1/css/jquery-weui.min.css">
    <link href="<%= global.config.path.publicPath %>/custom/css/articleTemplate.css" rel="stylesheet">
</head>
<body>
<div class="weui-tab" id='page-infinite-navbar'>
    <div class="weui-navbar">
        <div class="weui-navbar" style="position: fixed">
            <a href="#tab1" class="weui-navbar__item weui_bar__item_on" id="now">
                <div style="position: relative;left: 15%">
                    当前展会
                    <div class="left_hr"></div>
                </div>
            </a>
            <a href="#tab2" class="weui-navbar__item" id="past">
                <div style="position: relative;right: 15%">
                    以往展会
                    <div class="right_hr" hidden></div>
                </div>
            </a>
        </div>
    </div>
    <div class="weui-tab__bd">
        <% let outTimeaArr = pastArr %>
        <% let onTimeaArr = nowArr %>
        <div id="tab1" class="weui-tab__bd-item weui-tab__bd-item--active">
            <div id="now-part">
                <% if(onTimeaArr.length != 0){ %>
                <div class="out-container">
                    <div class="tab-news-container">
                        <% for(let i = 0;i < onTimeaArr.length;i++){ %>
                        <div class="tab-news-list">
                            <a href="<%= onTimeaArr[i].thirdUrl|| global.config.path.contextPath+'/fengqi/article/articleView/'+onTimeaArr[i].code %>">
                                <div class="tab-news-panel weui-flex">
                                    <div class=" tab-news-img">
                                        <% if(onTimeaArr[i].img){ %>
                                        <img src="<%= global.config.path.publicPath %>/uploadFiles<%= onTimeaArr[i].img.filePath %>"
                                             alt="">
                                        <% } %>
                                    </div>
                                    <div class="tab-news-title ">
                                        <p class="tab-title-font"><%= onTimeaArr[i].name %></p>
                                        <span class="tab-title-time">
                                            <span class="icon fa fa-map-marker"></span>
                                            <%= onTimeaArr[i].author || '地点未定' %>
                                            <br>
                                            <span class="icon fa fa-clock-o"></span>
                                            <% let eft,dat;
                                            if (onTimeaArr[i].effectiveTime) {
                                                eft = global.tool.dateFormatter(onTimeaArr[i].effectiveTime, 'yyyy/MM/dd')
                                            } else {
                                                eft = ''
                                            }
                                            if (onTimeaArr[i].disActiveTime) {
                                                dat = global.tool.dateFormatter(onTimeaArr[i].disActiveTime, 'yyyy/MM/dd')
                                            } else {
                                                dat = ''}
                                            %>
                                            <%= eft || '未规定时间' %>-<%= dat || '未规定时间' %>
                                        </span>
                                    </div>
                                </div>
                            </a>
                        </div>
                        <% } %>
                    </div>
                </div>
                <% }else { %>
                <img src="<%= global.config.path.publicPath %>/custom/images/icon/nomore.png" alt="" class="noMore">
                <h2 class="text-center">暂无更多内容啦</h2>
                <% } %>
            </div>
        </div>
        <div id="tab2" class="weui-tab__bd-item">
            <div id="old-part">
            <% if(outTimeaArr.length != 0){ %>
                <div class="out-container">
                    <div class="tab-news-container">
                        <% for(let i = 0;i < outTimeaArr.length;i++){ %>
                        <div class="tab-news-list">
                            <a href="<%= outTimeaArr[i].thirdUrl|| global.config.path.contextPath+'/fengqi/article/articleView/'+outTimeaArr[i].code %>">
                                <div class="tab-news-panel weui-flex">
                                    <div class=" tab-news-img">
                                        <% if(outTimeaArr[i].img){ %>
                                        <img src="<%=global.config.path.publicPath %>/uploadFiles<%= outTimeaArr[i].img.filePath %>"
                                             alt="">
                                        <% } %>
                                    </div>
                                    <div class="tab-news-title ">
                                        <p class="tab-title-font"><%= outTimeaArr[i].name ||''%></p>
                                        <span class="tab-title-time">
                                            <span class="icon fa fa-map-marker"></span>
                                            <%= outTimeaArr[i].author || '地点未定' %>
                                            <br><span class="icon fa fa-clock-o"></span>
                                            <% let eft,dat;
                                                if (outTimeaArr[i].effectiveTime) {
                                                    eft = global.tool.dateFormatter(outTimeaArr[i].effectiveTime, 'yyyy/MM/dd')
                                                } else {
                                                    eft = ''
                                                }
                                                if (outTimeaArr[i].disActiveTime) {
                                                    dat = global.tool.dateFormatter(outTimeaArr[i].disActiveTime, 'yyyy/MM/dd')
                                                } else {
                                                    dat = ''
                                                }
                                            %>
                                            <%= eft || '未规定时间' %>-<%= dat || '未规定时间' %>
                                        </span>
                                    </div>
                                </div>
                            </a>
                        </div>
                        <% } %>
                    </div>
                </div>
                <div id="haveAll"></div>
                <% }else { %>
                <img src="<%= global.config.path.publicPath %>/custom/images/icon/nomore.png" alt="" class="noMore"><h2 class="text-center">暂无更多内容啦</h2>
            <% } %>
            </div>
            <div class="weui-loadmore" id="pastLoad" hidden>
                <i class="weui-loading"></i>
                <span class="weui-loadmore__tips" hidden>正在加载</span>
            </div>

        </div>
    </div>



</div>
<input hidden id="bookcase" value="<%=id%>">


<script src="//cdn.bootcss.com/jquery/1.11.0/jquery.min.js"></script>
<script src="//cdn.bootcss.com/jquery-weui/1.0.1/js/jquery-weui.min.js"></script>
<script src="//cdn.bootcss.com/jquery-weui/1.0.1/js/swiper.min.js"></script>
<script src="<%= global.config.path.publicPath %>/libs/jquery-file-upload/js/vendor/jquery.ui.widget.js"></script>
<script src="<%= global.config.path.publicPath %>/libs/jquery-file-upload/js/jquery.fileupload.js"></script>
<script src="<%= global.config.path.publicPath %>/custom/js/articleTemplate.js"></script>
<!--dolphin-->
<script src="<%= global.config.path.publicPath %>/libs/dolphin/dolphin.js"></script>
<script src="<%= global.config.path.publicPath %>/libs/dolphin/local/message_zh-CN.js"></script>
<script src="<%= global.config.path.publicPath %>/custom/js/DolphinConfig.js"></script>
<script src="<%= global.config.path.publicPath %>/custom/js/customValidate.js"></script>
<script src="<%= global.config.path.publicPath %>/page-script/mobile/tabPage.js"></script>



<!-- body 最后 -->
<script src="//cdn.bootcss.com/jquery/1.11.0/jquery.min.js"></script>
<script src="//cdn.bootcss.com/jquery-weui/1.0.1/js/jquery-weui.min.js"></script>

<!-- 如果使用了某些拓展插件还需要额外的JS -->
<script src="//cdn.bootcss.com/jquery-weui/1.0.1/js/swiper.min.js"></script>
<script src="//cdn.bootcss.com/jquery-weui/1.0.1/js/city-picker.min.js"></script>
</body>
</html>
